package com.mm.domain.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 角色权限关系表
 * </p>
 *
 * @author JueDream
 * @since 2021-08-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_role_permission_relation")
@ApiModel(value="DRolePermissionRelation对象", description="角色权限关系表")
public class DRolePermissionRelation implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    public Integer Id;

    @ApiModelProperty(value = "角色编号")
    @TableField("role_id")
    public Integer roleId;

    @ApiModelProperty(value = "权限编号")
    @TableField("p_id")
    public Integer pId;

    @Builder
    public DRolePermissionRelation(Integer id, Integer roleId, Integer pId) {
        Id = id;
        this.roleId = roleId;
        this.pId = pId;
    }
}
